#include "StdAfx.h"
#include "RegExp.h"

BOOL isMatch(char* input,char* regex)
{
	CAtlRegExp<> reUrl;  
	REParseError status = reUrl.Parse(  
	        //"({[^:/?#]+}:)?(//{[^/?#]*})?{[^?#]*}(?{[^#]*})?(#{.*})?" 
			"84F2E002104F00([0-9a-fA-F]*)00"
			);  
	if (REPARSE_ERROR_OK != status)  
	{  
	        return 0;  
	}  
  
    CAtlREMatchContext<> mcUrl;  
    if (!reUrl.Match(  
	"84F2E002104F0011223300",  
	        &mcUrl))  
	    {  
	        return 0;  
	    }  
	for (UINT nGroupIndex = 0; nGroupIndex < mcUrl.m_uNumGroups;  
	         ++nGroupIndex)  
	    {  
	        const CAtlREMatchContext<>::RECHAR* szStart = 0;  
	        const CAtlREMatchContext<>::RECHAR* szEnd = 0;  
	        mcUrl.GetMatch(nGroupIndex, &szStart, &szEnd);  
	  
	        ptrdiff_t nLength = szEnd - szStart;  
	        //printf_s("%d: /"%.*s/"/n", nGroupIndex, nLength, szStart);  
	    }  
	return TRUE;
}